Magnets are becoming more ubiquitous in some devices as a means of attaching two objects together. For example, an electronic device may include magnets to couple accessories and/or cables to the device, such as a power cord or a display cover. However, use of magnets in these applications may have some disadvantages. As with any magnet, these magnets may adversely affect other devices, such as by demagnetizing and erasing data from magnetic stripes on payment cards. These magnets also often have a high magnetic attachment force that increases as the distance between coupling objects decreases. This may create a problem of accelerating the two objects very quickly, which may be undesirable to some users.